package cn.mw.cmdb.link.enums;

/**
 * @description 趋势值类型
 */
public enum LinkTrendValueTypeEnum {
    MAX(1,"最大"),
    AVG(2,"平均"),
    MIN(3,"最小"),
    ;

    private Integer type;

    private String desc;

    LinkTrendValueTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static LinkTrendValueTypeEnum getTrendValueTypeEnum(Integer type) {
        if(type == null){return null;}
        for (LinkTrendValueTypeEnum trendValueTypeEnum : values()) {
            if (type.equals(trendValueTypeEnum.getType())) {
                return trendValueTypeEnum;
            }
        }
        return null;
    }
}
